﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "IObject.h"


namespace gcmp {  

    class IGroupCopyProcessor;

    /// \brief 组设置接口类
    /// 
    /// IGroupSetting是基于App的全局设置，不会保存到文档
    class GCMP_MODEL_INTERFACE_EXPORT IGroupSetting : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::IGroupSetting, gcmp::IObject);
    public:

        /// \brief 获取IGroupSetting对象
        /// \return 返回IGroupSetting实例的指针
        static IGroupSetting* Get();

        /// \brief 设置组内元素是否可拾取
        /// \param isSnapble 可拾取为true，不可拾取为false
        /// \return 
        /// \note 当设置为true时，场景中所有group内的元素均可拾取
        /// 当设置为false时，只有IGroup的IsSubElementSnapble为true时，该IGroup内的元素才可拾取
        virtual void SetSubElementSnapble(bool isSnapble) = 0;

        /// \brief 获取组内元素是否可拾取
        ///
        /// \return 组内元素可拾取返回true，否则返回false
        virtual bool IsSubElementSnapble() const = 0;

        /// \brief 设置全局的组拷贝处理器
        /// \param pGroupCopyProcessor 组拷贝处理器接口
        /// \return 
        /// \note 平台有默认的拷贝处理器，如果产品希望使用自己的拷贝处理器，需要调用该接口设置
        virtual void SetGroupCopyProcessor(OwnerPtr<IGroupCopyProcessor> pGroupCopyProcessor) = 0;

        /// \brief 获取全局的组拷贝处理器
        /// 
        /// \return 返回组拷贝处理器
        virtual IGroupCopyProcessor* GetGroupCopyProcessor() = 0;

        virtual ~IGroupSetting() {}
    };
}// namespace gcmp
